package com.ugoodtech.mdcc.core.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

@ApiModel("客户满意度报告--改")
@Entity
@Table(name = "customer_report")
public class CustomerReport extends BaseEntity {

    @ApiModelProperty("填写报告的人")
    private User user;

    @ApiModelProperty("维修站")
    private Station station;

    @ApiModelProperty("问题ID")
    private Long questionId;

    @ApiModelProperty("答案ID")
    private Long answerId;

    @ApiModelProperty("是否更新过题目")
    private boolean is_new = false;

    @ApiModelProperty("满意度报告分数")
    private Integer score;

    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne
    @JoinColumn(name = "station_id")
    public Station getStation() {
        return station;
    }

    public void setStation(Station station) {
        this.station = station;
    }

    @Column(name = "question_id")
    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    @Column(name = "answer_id")
    public Long getAnswerId() {
        return answerId;
    }

    public void setAnswerId(Long answerId) {
        this.answerId = answerId;
    }

    @JsonIgnore
    @Column(name = "is_new")
    public boolean isIs_new() {
        return is_new;
    }

    public void setIs_new(boolean is_new) {
        this.is_new = is_new;
    }

    @Column(name = "score")
    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }
}
